/**
 * 
 */
package org.cuatrovientos.bill;

import static org.junit.Assert.*;

import org.junit.BeforeClass;
import org.junit.Test;

/**
 * @author Axel
 *
 */
public class ProductTest {

	@Test
	public void testNew() {
		Product product = new Product("Pan", 0.50f, 1);
		assertEquals("Checking name", product.getName(), "Pan");
		assertEquals("Checking price", product.getPrice(), 0.50f);
		assertEquals("Checking quantity", product.getQuantity(), 1);
	}
	
	@Test
	public void testTotal() {
		Product product = new Product("Panes", 0.50f, 2);
		float target = product.getPrice()*2;
		
		assertEquals("Checking total", target, 1f);
	}

}
